package com.mall.domain.po;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @description: 订单实体
 * @author 勾新杰
 * @version 1.0
 * @date 2024/11/25 10:31
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "订单实体")
public class Order {
    @Schema(description = "订单id")
    private Long id;
    @Schema(description = "用户id")
    private Long userId;
    @Schema(description = "地址id")
    private Long addressId;
    @Schema(description = "订单号")
    private Long orderNo;
    @Schema(description = "订单总金额")
    private Double totalAmount;
    @Schema(description = "订单状态,0未支付，1已支付, 2未发货，3已发货，4已收货，5已退货")
    private Integer orderStatus;
    @Schema(description = "订单支付时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime paymentTime;
    @Schema(description = "订单发货时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryTime;
    @Schema(description = "订单创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @Schema(description = "订单更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
